Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.pvzChannelWeb = undefined;
var $2pvzChannel = require("pvzChannel");
var $2kc = require("kc");
exports.pvzChannelWeb = /* */function () {
  function _class12() {
    babel_classCallCheck(this, _class12);
    this.channel = "web";
    this.paraMap = new Map([]);
    this.ruanzhu = "";
    this.channelObj = window;
    this.ctrl = null;
    this.interstitialAd = null;
    this.bannerAd = null;
    this.rewardedVideoAd = null;
    this.customAd1 = null;
    this.customAd2 = null;
    this.boxPortalAd = null;
    this.sysInfo = null;
    this.adTimeCount = 0;
    this.adTimeCountTag = -1;
    this.isShare = false;
    this.shareTime = 0;
    this.shareFailBack = null;
    this.shareSucBack = null;
    this.videoFns = {};
    this.nativeAds = {};
    this.nativeAdListMap = {};
    this.nativeAdCallMap = {};
    this.nativeNodeMap = {};
  }
  babel_createClass(_class12, [{
    key: "setParaMap",
    value: function setParaMap(e) {
      this.paraMap = e;
    }
  }, {
    key: "getPara",
    value: function getPara(e) {
      return this.paraMap.get(e);
    }
  }, {
    key: "getRuanZhu",
    value: function getRuanZhu() {
      return this.ruanzhu;
    }
  }, {
    key: "apiReport",
    value: function apiReport(e) {
      var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
    }
  }, {
    key: "exit",
    value: function exit() {}
  }, {
    key: "getSysInfo",
    value: function getSysInfo() {
      this.sysInfo || (this.sysInfo = {
        windowHeight: cc.view.getVisibleSize().height,
        windowWidth: cc.view.getVisibleSize().width
      });
      return this.sysInfo;
    }
  }, {
    key: "hasPrivacy",
    value: function hasPrivacy() {
      return true;
    }
  }, {
    key: "privacyAgree",
    value: function privacyAgree() {
      $2kc.default.getData("isAgree", 0) || $2kc.default.saveData("isAgree", 1);
      return 1;
    }
  }, {
    key: "getCtrl",
    value: function getCtrl(e) {
      if (this.ctrl && this.ctrl[e]) {
        return parseInt(this.ctrl[e]);
      } else {
        return 0;
      }
    }
  }, {
    key: "getPrivacyShort",
    value: function getPrivacyShort() {
      return "";
    }
  }, {
    key: "getPrivacy",
    value: function getPrivacy() {
      return "";
    }
  }, {
    key: "onCtrlDone",
    value: function onCtrlDone() {}
  }, {
    key: "init",
    value: function init() {
      $2kc.default.log("目标===>" + this.channel + ",R:" + $2pvzChannel.pvzChannel.isConfRemote + ",gid:" + this.getPara("gid"));
    }
  }, {
    key: "startAdTimeCount",
    value: function startAdTimeCount(e, t) {
      var _this278 = this;
      var a = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
      this.adTimeCountTag = setInterval(function () {
        _this278.adTimeCount++;
        if (_this278.adTimeCount >= e) {
          t && t(_this278.adTimeCount);
          a && (_this278.adTimeCount = 0);
        }
      }, 1e3);
      $2kc.default.log("继续---------adTimeCount", this.adTimeCount);
    }
  }, {
    key: "pauseAdTimeCount",
    value: function pauseAdTimeCount() {
      clearInterval(this.adTimeCountTag);
      $2kc.default.log("暂停---------adTimeCount", this.adTimeCount);
    }
  }, {
    key: "isShareSuc",
    value: function isShareSuc() {
      return !(new Date().getTime() - this.shareTime < 3e3 || (this.shareTime = new Date().getTime(), 0));
    }
  }, {
    key: "canShare",
    value: function canShare() {
      return false;
    }
  }, {
    key: "shareAppMessage",
    value: function shareAppMessage(e) {
      var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
      var a = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
    }
  }, {
    key: "copyToClip",
    value: function copyToClip(e, t) {
      var a = document.createElement("textarea");
      a.value = e;
      a.setAttribute("readonly", "");
      a.style.position = "absolute";
      a.style.left = "-9999px";
      a.style.fontSize = "12pt";
      var n = getSelection();
      var s;
      n.rangeCount > 0 && (s = n.getRangeAt(0));
      document.body.appendChild(a);
      a.select();
      a.selectionStart = 0;
      a.selectionEnd = e.length;
      var o = false;
      try {
        o = document.execCommand("copy");
        t();
      } catch (l) {
        $2kc.default.err(l);
        t("复制失败!");
      }
      document.body.removeChild(a);
      if (s) {
        n.removeAllRanges();
        n.addRange(s);
      }
    }
  }, {
    key: "showVideo",
    value: function showVideo(e) {
      e.sucCall();
      e.endCall();
    }
  }, {
    key: "addGird9Icon",
    value: function addGird9Icon(e, t) {}
  }, {
    key: "gird9IconClick",
    value: function gird9IconClick() {}
  }, {
    key: "showGird9",
    value: function showGird9() {}
  }, {
    key: "canAutoGird9",
    value: function canAutoGird9() {
      return false;
    }
  }, {
    key: "closeGird9",
    value: function closeGird9() {}
  }, {
    key: "showBanner",
    value: function showBanner() {
      var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
      var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
      var a = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
    }
  }, {
    key: "closeBanner",
    value: function closeBanner() {}
  }, {
    key: "showBannerByTime",
    value: function showBannerByTime() {
      var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
    }
  }, {
    key: "closeBannerByTime",
    value: function closeBannerByTime() {}
  }, {
    key: "checkNativeInsert",
    value: function checkNativeInsert(e) {
      return false;
    }
  }, {
    key: "showNative",
    value: function showNative(e, t, a) {
      var n = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
      var i = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
    }
  }, {
    key: "loadAndShowNative",
    value: function loadAndShowNative(e, t, a) {}
  }, {
    key: "loadNative",
    value: function loadNative(e, t) {}
  }, {
    key: "findAndReport",
    value: function findAndReport() {}
  }, {
    key: "reportAdShow",
    value: function reportAdShow(e, t) {}
  }, {
    key: "reportAdClick",
    value: function reportAdClick(e) {}
  }, {
    key: "closeNative",
    value: function closeNative(e) {}
  }, {
    key: "getNativeData",
    value: function getNativeData(e) {}
  }, {
    key: "showCustomAd",
    value: function showCustomAd(e) {
      var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
      var a = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
    }
  }, {
    key: "closeCustomAd",
    value: function closeCustomAd() {
      var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
    }
  }, {
    key: "showInter",
    value: function showInter() {
      var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
    }
  }, {
    key: "closeInter",
    value: function closeInter() {}
  }, {
    key: "showDesktop",
    value: function showDesktop(e, t) {}
  }, {
    key: "addShortcut",
    value: function addShortcut() {}
  }, {
    key: "recorderStart",
    value: function recorderStart() {}
  }, {
    key: "recorderStop",
    value: function recorderStop() {}
  }, {
    key: "getRecordTime",
    value: function getRecordTime() {
      return 0;
    }
  }, {
    key: "shareVideo",
    value: function shareVideo() {
      var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
    }
  }, {
    key: "jumpTo",
    value: function jumpTo(e) {
      var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};
      var a = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function () {};
      var n = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : function () {};
    }
  }, {
    key: "canMoreGame",
    value: function canMoreGame() {
      return false;
    }
  }, {
    key: "showMoreGameBox",
    value: function showMoreGameBox(e, t, a) {}
  }, {
    key: "isShowJsdxBuy",
    value: function isShowJsdxBuy() {
      return false;
    }
  }, {
    key: "showJsdxBuy",
    value: function showJsdxBuy(e) {}
  }]);
  return _class12;
}();